***************************************************
****----			Table 4	  			   ----****
***************************************************

clear all
cap log close 
set more off

****---- Change directory

global data "/Users/Replication material/Data"

****---- Analysis

use "$data/dataset_replication.dta", clear

global controls Capoluogodiprovincia  population_density_1911 expenditures_1912_PC surplus_tot_1912_PC exp_police_hygiene_1912_PC exp_just_secur_1912_PC  exp_edu_1912_PC exp_public_work_1912_PC share_literate share_literate_male share_literate_female share_male


qui reghdfe gini_log aug_dec_18_D $controls, cluster(distretto_FE) absorb(i.Zonaaltimetrica i.N_contribuenti_quartile##i.distretto_FE)
est store reg11_at
qui reghdfe gini_log aug_dec_18_d_sd  $controls, cluster(distretto_FE) absorb(i.Zonaaltimetrica i.N_contribuenti_quartile##i.distretto_FE)
est store reg12_at
qui reghdfe gini_log aug_dec_18_out_sd  $controls, cluster(distretto_FE) absorb(i.Zonaaltimetrica i.N_contribuenti_quartile##i.distretto_FE)
est store reg13_at
qui reghdfe gini_log  N_caduti_PC_noTR_sd $controls, cluster(distretto_FE) absorb(i.Zonaaltimetrica i.N_contribuenti_quartile##i.distretto_FE)
est store reg14_at

esttab reg11_at reg12_at reg13_at reg14_at , keep(aug_dec_18_out_sd N_caduti_PC_noTR_sd aug_dec_18_D aug_dec_18_d_sd) se r2 staraux collabels(, none) ml(,none) cells(b(star fmt (%9.3f)) se(par)) star(* 0.10 ** 0.05 *** 0.01) replace
